<div class="open-form">
    <div class="open-model">
        <div class="open-auto">
            <button class="layui-btn" id="isCheckFun" style="border-radius: 4px;margin-bottom: 10px">确认选择</button>
            <table id="warehouseUseFormTable"></table>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">关闭</button>
        </div>
    </div>
</div>
<script>
    layui.use(['layer', 'form', 'table', 'admin', 'upload', 'tree', 'laytpl'], async function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var table = layui.table;
        var config = layui.config;
        const nowData = {...parentData}
        let cacheList = nowData.cacheList
        table.render({
            elem: '#warehouseUseFormTable',
            url: config.base + `warehouse/warehouse/admin/customer/list`,
            where: {notInListIds: nowData.notInListIds},
            page: true,
            cellMinWidth: 100,
            cols: [[
                {type: 'checkbox', fixed: 'left'}
                ,{field: 'customerName', align:'center', title: '企业名称', width: 240}
                ,{field: 'customerLicense', align:'center', title: '营业执照号'}
                ,{field: 'province',  align:'center', title: '省'}
                ,{field: 'city',  align:'center', title: '市'}
                ,{field: 'area',  align:'center', title: '区'}
                ,{field: 'address', align:'center', title: '客户地址'}
            ]],
        });
        $('#isCheckFun').click(() => {
            var checkStatus = table.checkStatus('warehouseUseFormTable');

            var data = checkStatus.data;  // 选中的数据
            if (typeof parent.layui !== 'undefined') {
                childData.list = data.map(v => {
                    v.productDetailId = v.id;
                    v.warehousePrice = 1.03;
                    delete v.id
                    return v
                })
                console.log('childData', data)
                layer.close(parentData.zindex); // 关闭指定的弹窗
            }
        })

    })
</script>